<?php require VIEWPATH. "cms". DIRECTORY_SEPARATOR. 'header.php'?>
<div class="Sbanner" style="background-image:url(<?=$cmsInfo['cms_category_banner']?>)">
    <div class="container valign relative">
        <p><?=$categoryInfo['category_name']?></p>
    </div>
</div>
<div class="ab_top">
    <div class="container ">
        <div class="row clearfix">
            <div class="col-xs-12 col-md-8">
                <div class="ab_type">
                    <ul>
                        <?php foreach($childCategoryList as $child): ?>
                            <li>
                                <?php $actived = $child['id'] == $categoryInfo['id'] ? 'actived' : ''; ?>
                                <a href="<?=web_url('cms/category/'. $cmsInfo['cms_token'])?>/<?=$child['id']?>" class='<?=$actived?>'>
                                    <?=$child['category_name']?>
                                </a>
                            </li>    
                        <?php endforeach; ?>
                    </ul>
                </div>
            </div>
            <div class="col-xs-12 col-md-4 hidden-xs hidden-sm">
                <div class="location">
                    <a href='/8112/'>主页</a> > 
                    <?php if($parentCategory): ?>
                        <a href='<?=web_url('cms/category/'. $cmsInfo['cms_token'])?>/<?=$parentCategory['id']?>'><?=$parentCategory['category_name']?></a> > 
                    <?php endif; ?>
                    <a href='<?=web_url('cms/category/'. $cmsInfo['cms_token'])?>/<?=$categoryInfo['id']?>'><?=$categoryInfo['category_name']?></a>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="ab_content">
    <div class="container ">
        <?php if($categoryInfo['category_type'] == CMS_CATEGORY_ARTICLE): ?>
            <div class="note_content"> 
                <div class="row clearfix" style="margin: 0px 20px">
                    <?=$categoryInfo['category_article_content']?>
                </div>
            </div>
        <?php else: ?>
            <div class="news_list">
                <div class="row clearfix">
                    <?php foreach($articleList as $article): ?>
                        <div class="col-xs-6 col-md-4">
                            <a href="<?=web_url('cms/article/'. $cmsInfo['cms_token'])?>/<?=$article['id']?>">
                                <div class="img">
                                    <img src="<?=$article['article_cover']?>" alt="<?=$article['article_title']?>">
                                </div>
                                <div class="tt ellipsis"><?=$article['article_title']?></div>
                                <div class="date">发布日期：<?=date("Y-m-d", strtotime($article['createtime']))?></div>
                                <p class="towLine"><?=mb_substr(strip_tags($article['article_content']), 0, 70, WEB_CHARSET)?>......</p>
                                <span class="red">详情 &gt;&gt;</span> 
                            </a> 
                        </div>
                    <?php endforeach; ?>
                </div>
            </div>
        <?php endif; ?>
    </div>
</div>
<?php require VIEWPATH. "cms". DIRECTORY_SEPARATOR. 'footer.php'?>
<script src="<?=$staticUrl?>assets/cms/jquery-1.11.3.min.js" type="text/javascript"></script> 
<script src="<?=$staticUrl?>assets/cms/bootstrap.min.js"></script> 
<script src="<?=$staticUrl?>assets/cms/common.js" type="text/javascript"></script>
</body>
</html>
